package com.weimob.mcloud.wechatwork.customer.export;

import com.weimob.mcloud.wechatwork.customer.facade.impl.sidebar.SidebarFacade;
import com.weimob.mcloud.wechatwork.customer.service.user.base.PageResponse;
import com.weimob.mcloud.wechatwork.customer.service.user.module.bo.sidebar.*;
import com.weimob.mcloud.wechatwork.customer.service.user.module.dto.sidebar.*;
import com.weimob.mcloud.wechatwork.customer.service.user.service.CustomerSidebarExport;
import com.weimob.mcloud.wechatwork.customer.service.user.utils.SoaResponseUtil;
import com.weimob.soa.common.response.SoaResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author yu liu  2021/10/25 17:42
 * Description
 * Version 1.0.0
 **/
@Slf4j
@Service
public class CustomerSidebarExportImpl implements CustomerSidebarExport {

    @Autowired
    private SidebarFacade sidebarFacade;

    @Override
    public SoaResponse<SidebarAuthBO, ?> getSidebarAuth(SidebarCommonDTO sidebarCommonDTO) {
        return SoaResponseUtil.ok(sidebarFacade.getSidebarAuth(sidebarCommonDTO));
    }

    @Override
    public SoaResponse<SidebarEmployeeAuthBO, ?> getSidebarEmployeeAuth(SidebarCommonDTO sidebarCommonDTO) {
        return SoaResponseUtil.ok(sidebarFacade.getSidebarEmployeeAuth(sidebarCommonDTO));
    }

    @Override
    public SoaResponse<SidebarStoreBO, ?> getStoreList(SidebarStoreDTO sidebarStoreDTO) {
        return SoaResponseUtil.ok(sidebarFacade.getDefaultStore(sidebarStoreDTO));
    }

    @Override
    public SoaResponse<PageResponse<SidebarCouponBO>, ?> getCoupons(QuerySidebarCouponsDto couponsDto) {
        return SoaResponseUtil.ok(sidebarFacade.getCoupons(couponsDto));
    }

    @Override
    public SoaResponse<PageResponse<SidebarGoodsBO>, ?> getGoodsList(SidebarGoodsDTO sidebarGoodsDTO) {
        return SoaResponseUtil.ok(sidebarFacade.getGoodsList(sidebarGoodsDTO));
    }

    @Override
    public SoaResponse<PageResponse<SidebarDistributionGoodsBO>, ?> getDistributionGoodsList(SidebarDistributionGoodsDTO sidebarGoodsDTO) {
        return SoaResponseUtil.ok(sidebarFacade.getDistributionGoodsList(sidebarGoodsDTO));
    }

    @Override
    public SoaResponse<List<GoodsClassifyBO>, ?> getGoodsClassifyList(GoodsClassifyDto goodsClassifyDto) {
        return SoaResponseUtil.ok(sidebarFacade.getGoodsClassifyList(goodsClassifyDto));
    }

    @Override
    public SoaResponse<ShortCodeBO, ?> getShortCode(CreateUrlDTO createUrlDTO) {
        return SoaResponseUtil.ok(sidebarFacade.getShortCode(createUrlDTO));
    }

    @Override
    public SoaResponse<ShortCodeBO, ?> getShortCodeV2(CreateUrlDTO createUrlDTO) {
        return SoaResponseUtil.ok(sidebarFacade.getShortCodeV2(createUrlDTO));
    }

    @Override
    public SoaResponse<PmcParamsUrlBO, ?> getPmcParamUrl(CreateUrlDTO createUrlDTO) {
        return SoaResponseUtil.ok(sidebarFacade.getPmcParamUrl(createUrlDTO));
    }

    @Override
    public SoaResponse<ShortCodePmcUrlBO, ?> getPmcShortCodeUrl(CreateUrlDTO createUrlDTO) {
        return SoaResponseUtil.ok(sidebarFacade.getPmcShortCodeUrl(createUrlDTO));
    }

    @Override
    public SoaResponse<ShortCodeParamsInfoBO, ?> getRealParamFronQwzsKey(String shortCode, String scene) {
        return SoaResponseUtil.ok(sidebarFacade.getShortCodeInfo(shortCode, scene));
    }

    @Override
    public SoaResponse<PageResponse<OrderBO>, ?> queryOrderList(OrderListDTO orderListDTO) {
        return SoaResponseUtil.ok(sidebarFacade.queryOrderList(orderListDTO));
    }

    @Override
    public SoaResponse<OrderBO, ?> queryOrderDetail(OrderDetailDTO orderDetailDTO) {
        return SoaResponseUtil.ok(sidebarFacade.queryOrderDetail(orderDetailDTO));
    }
}
